package com.framework.admin.repository;

import com.framework.admin.model.SysUserRole;
import com.framework.common.repository.BaseJpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysUserRoleRepository extends BaseJpaRepository<SysUserRole, String> {
    void deleteByUserIdIn(List<String> roleIds);

    List<SysUserRole> findByUserId(String userId);

    List<SysUserRole> findByRoleId(String roleId);

    void deleteByRoleId(String id);

    SysUserRole findTopByRoleIdAndUserId(String roleId,String userId);

    List<SysUserRole> findByRoleIdAndUserId(String roleId,String userId);
}
